#!/bin/bash

ROOT_PATH=$(realpath "$(dirname "$0")")
export LD_LIBRARY_PATH=$ROOT_PATH/tools/protobuf/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$ROOT_PATH/tools/protobuf-c/lib:$LD_LIBRARY_PATH
echo $LD_LIBRARY_PATH
PROTOC_C_TOOL=$ROOT_PATH/tools/protobuf-c/bin/protoc-c
PROTOC_TOOL=$ROOT_PATH/tools/protobuf/bin/protoc
pushd .
#Generator ipc service proto file
cd $ROOT_PATH/src/ipc/ipc-services/sim/src
$PROTOC_C_TOOL --c_out=. IpcSimService.proto

#Generator ipc client proto file
cd $ROOT_PATH/src/ipc/ipc-client/src
$PROTOC_TOOL --cpp_out=. IpcSimService.proto
popd
